package com.nioserver.lib;

import net.sf.json.JSONObject;
import org.luaj.vm2.LuaValue;

public class LuaObj {
    public LuaValue luaValue;
    public String uuid;
    public int address;
    public String serviceName;
    public LuaObj(String uuid, LuaValue val, int address, String serviceName){
        this.uuid = uuid;
        this.luaValue = val;
        this.address = address;
        this.serviceName = serviceName;
    }

    public String toJson(){
        JSONObject jb = new JSONObject();
        jb.put("uuid",uuid);
        jb.put("address",address);
        return jb.toString();
    }
}
